package com.qidian.buy.search.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRepositoriesAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author 戴着假发的程序员
 * @Company 起点编程
 * @date 2023/5/23 10:24
 */
//@Configuration
public class ElasticsearchConfig {
//    @Bean
    public RestHighLevelClient restHighLevelClient(){
        System.out.println("123123");
        RestHighLevelClient client = new RestHighLevelClient(
                RestClient.builder(
                        new HttpHost("192.168.21.137", 9200, "http")));
        return client;
    }
}
